/*
    Kelompok    2
    Kelas       2
    Anggota :
    1. Yudha Wastu Prawira      / 13509002
    2. Robertus Theodore        / 13509008
    3. Rendy Bambang Junior     / 13509036
    4. Hartono Sulaiman Wijaya  / 13509046
    5. Daniel Prihartoni        / 13509088
    6. Raydhitya Yosep          / 13509092

*/

#ifndef _CONSTANT_H
#define _CONSTANT_H

#define MARK '#'
#define BLANK ' '

//state code constant
#define APP_STATE 0
#define GAME_STATE 1
#define EXIT_STATE 2

//dwarf type code
#define WATERING_DWARF_CODE 1
#define HARVESTING_DWARF_CODE 2
#define SLASHING_DWARF_CODE 3

//dwarf type string
#define WATERING_DWARF_STRING "Jono"
#define HARVESTING_DWARF_STRING "Jona"
#define SLASHING_DWARF_STRING "Joni"

//dwarf status code
#define SLEEP 0
#define WAKE_UP 1

//direction code
#define UP 0
#define RIGHT 1
#define DOWN 2
#define LEFT 3

//player's max time
#define MAX_TIME 100

//player's empty time
#define EMPTY_TIME 0

//area string constants
#define HOME_STRING "home"
#define FARM_STRING "farm"
#define STORE_STRING "store"

//area code
#define HOME_CODE 1
#define FARM_CODE 2
#define STORE_CODE 3

//item string constants
#define CARROT_FRUIT_STRING "Carrot"
#define TOMATO_FRUIT_STRING "Tomato"
#define CHILLI_FRUIT_STRING "Chilli"
#define STRAWBERRY_FRUIT_STRING "Strawberry"
#define MELON_FRUIT_STRING "Melon"
#define CARROT_SEED_STRING "Carrot Seed"
#define TOMATO_SEED_STRING "Tomato Seed"
#define CHILLI_SEED_STRING "Chilli Seed"
#define STRAWBERRY_SEED_STRING "Strawberry Seed"
#define MELON_SEED_STRING "Melon Seed"
#define CARROT_EFFECT_STRING "Energy Power UP!"
#define TOMATO_EFFECT_STRING "Energy Power UP!"
#define CHILLI_EFFECT_STRING "Diare! Energy decreased"
#define STRAWBERRY_EFFECT_STRING "Energy Power UP!"
#define MELON_EFFECT_STRING "Energy Power UP!"

//item code
#define CARROT_FRUIT_CODE 1
#define TOMATO_FRUIT_CODE 2
#define CHILLI_FRUIT_CODE 3
#define STRAWBERRY_FRUIT_CODE 4
#define MELON_FRUIT_CODE 5
#define CARROT_SEED_CODE 6
#define TOMATO_SEED_CODE 7
#define CHILLI_SEED_CODE 8
#define STRAWBERRY_SEED_CODE 9
#define MELON_SEED_CODE 10

//item type
#define SEED 0
#define FRUIT 1

//count
#define STORE_ITEM_COUNT 5
#define PLANT_TYPE_COUNT 5

//plant type string
#define CARROT_PLANT_STRING "Carrot Plant"
#define TOMATO_PLANT_STRING "Tomato Plant"
#define CHILLI_PLANT_STRING "Chilli Plant"
#define STRAWBERRY_PLANT_STRING "Strawberry Plant"
#define MELON_PLANT_STRING "Melon Plant"

//plant type code
#define CARROT_PLANT_CODE 1
#define TOMATO_PLANT_CODE 2
#define CHILLI_PLANT_CODE 3
#define STRAWBERRY_PLANT_CODE 4
#define MELON_PLANT_CODE 5

//harvest type
#define HARVEST_ONCE 0
#define REPETITIOUS_HARVEST 1

//seed price
#define CARROT_SEED_PRICE 25
#define TOMATO_SEED_PRICE 200
#define CHILLI_SEED_PRICE 100
#define STRAWBERRY_SEED_PRICE 250
#define MELON_SEED_PRICE 300

//fruit price
#define CARROT_FRUIT_PRICE 40
#define TOMATO_FRUIT_PRICE 75
#define CHILLI_FRUIT_PRICE 30
#define STRAWBERRY_FRUIT_PRICE 100
#define MELON_FRUIT_PRICE 150

//adult point
#define CARROT_ADULT_POINT 3
#define TOMATO_ADULT_POINT 5
#define CHILLI_ADULT_POINT 5
#define STRAWBERRY_ADULT_POINT 7
#define MELON_ADULT_POINT 8

//harvest point
#define CARROT_HARVEST_POINT 4
#define TOMATO_HARVEST_POINT 8
#define CHILLI_HARVEST_POINT 7
#define STRAWBERRY_HARVEST_POINT 11
#define MELON_HARVEST_POINT 13

//LIFETIME
#define CARROT_LIFETIME 5
#define TOMATO_LIFETIME 42
#define CHILLI_LIFETIME 50
#define STRAWBERRY_LIFETIME 25
#define MELON_LIFETIME 40

//plant harvest type
#define CARROT_HARVEST_TYPE HARVEST_ONCE
#define TOMATO_HARVEST_TYPE REPETITIOUS_HARVEST
#define CHILLI_HARVEST_TYPE REPETITIOUS_HARVEST
#define STRAWBERRY_HARVEST_TYPE REPETITIOUS_HARVEST
#define MELON_HARVEST_TYPE REPETITIOUS_HARVEST
//default save extension file
#define SAVE_FILE_EXTENSION ".hm"

//command string constants
#define START_COMMAND_STRING "start"
#define TELEPORT_COMMAND_STRING "teleport"
#define NEWGAME_COMMAND_STRING "new"
#define LOADGAME_COMMAND_STRING "load"
#define RIGHT_COMMAND_STRING "right"
#define LEFT_COMMAND_STRING "left"
#define UP_COMMAND_STRING "up"
#define DOWN_COMMAND_STRING "down"
#define PLOW_COMMAND_STRING "plow"
#define PUT_COMMAND_STRING "put"
#define SLASH_COMMAND_STRING "slash"
#define WATER_COMMAND_STRING "water"
#define HARVEST_COMMAND_STRING "harvest"
#define WAKEUP_COMMAND_STRING "wake_up"
#define SLEEP_COMMAND_STRING "sleep"
#define STATUS_COMMAND_STRING "status"
#define SAVE_COMMAND_STRING "save"
#define EXIT_COMMAND_STRING "exit"
#define STORE_COMMAND_STRING "store"
#define BUY_COMMAND_STRING "buy"
#define SELL_COMMAND_STRING "sell"
#define INVENTORY_COMMAND_STRING "inventory"
#define PLANT_COMMAND_STRING "plant"
#define COMMAND_NOT_FOUND_STRING "notfound"
#define EAT_COMMAND_STRING "eat"
#define ADVENTURE_COMMAND_STRING "adventure"
#define COMMAND_COMMAND_STRING "command"

//command parameter string constants
#define HELP_STRING "-help"
#define PLAYER_STRING "player"
#define DWARF_STRING "kurcaci"

//command code constants
#define START_COMMAND_CODE 0
#define TELEPORT_COMMAND_CODE 1
#define NEWGAME_COMMAND_CODE 2
#define LOADGAME_COMMAND_CODE 3
#define RIGHT_COMMAND_CODE 4
#define LEFT_COMMAND_CODE 5
#define UP_COMMAND_CODE 6
#define DOWN_COMMAND_CODE 7
#define PLOW_COMMAND_CODE 8
#define PUT_COMMAND_CODE 9
#define SLASH_COMMAND_CODE 10
#define WATER_COMMAND_CODE 11
#define HARVEST_COMMAND_CODE 12
#define WAKEUP_COMMAND_CODE 13
#define SLEEP_COMMAND_CODE 14
#define STATUS_COMMAND_CODE 15
#define SAVE_COMMAND_CODE 16
#define EXIT_COMMAND_CODE 17
#define STORE_COMMAND_CODE 18
#define BUY_COMMAND_CODE 19
#define SELL_COMMAND_CODE 20
#define INVENTORY_COMMAND_CODE 21
#define PLANT_COMMAND_CODE 22
#define COMMAND_NOT_FOUND_CODE 9999
#define EAT_COMMAND_CODE 23
#define ADVENTURE_COMMAND_CODE 24
#define COMMAND_COMMAND_CODE 25

//command parameter code constants
#define HELP_CODE 1
#define PLAYER_CODE 2
#define DWARF_CODE 3

//default player
#define DEFAULT_BALANCE 1000
#define MAX_SLOT 3

//default farm
#define FARM_WIDTH 11
#define FARM_HEIGHT 11
#define DEFAULT_SELLING_POINT_X 1
#define DEFAULT_SELLING_POINT_Y 9
#define DEFAULT_POS_DWARF1_X 6
#define DEFAULT_POS_DWARF1_Y 1
#define DEFAULT_POS_DWARF2_X 7
#define DEFAULT_POS_DWARF2_Y 1
#define DEFAULT_POS_DWARF3_X 8
#define DEFAULT_POS_DWARF3_Y 1
#define DEFAULT_PORTAL_X 1
#define DEFAULT_PORTAL_Y 1
#define DEFAULT_DIRECTION RIGHT

//constant for harpesmun mode
#define COMMAND_MODE 1
#define ADVENTURE_MODE 2

//constant for symbol
const int PLAYER_LEFT   = 3;
const int PLAYER_RIGHT  = 1;
const int PLAYER_UP     = 0;
const int PLAYER_DOWN   = 2;
const int PORTAL        = 4;
const int SELLER        = 5;
const int TREE          = 6;
const int GRASS         = 7;
const int ROAD          = 8;

const int DWARF1 = 9;
const int DWARF2 = 10;
const int DWARF3 = 11;

const int FARM_HARVESTED = 12;
const int FARM_PLOWED = 13;
const int FARM_WATERED = 14;



const int FARM_CARROT_SEED = 15;
const int FARM_CHILLI_SEED = 16;
const int FARM_MELON_SEED = 17;
const int FARM_STRAWBERRY_SEED = 18;
const int FARM_TOMATO_SEED = 19;

const int FARM_CARROT_SEED_WATERED = 20;
const int FARM_CHILLI_SEED_WATERED = 21;
const int FARM_MELON_SEED_WATERED = 22;
const int FARM_STRAWBERRY_SEED_WATERED = 23;
const int FARM_TOMATO_SEED_WATERED = 24;

const int FARM_CARROT_ADULT = 25;
const int FARM_CHILLI_ADULT = 26;
const int FARM_MELON_ADULT = 27;
const int FARM_STRAWBERRY_ADULT = 28;
const int FARM_TOMATO_ADULT = 29;

const int FARM_CARROT_ADULT_WATERED = 30;
const int FARM_CHILLI_ADULT_WATERED = 31;
const int FARM_MELON_ADULT_WATERED = 32;
const int FARM_STRAWBERRY_ADULT_WATERED = 33;
const int FARM_TOMATO_ADULT_WATERED = 34;

const int FARM_CARROT_FRUITED= 35;
const int FARM_CHILLI_FRUITED = 36;
const int FARM_MELON_FRUITED = 37;
const int FARM_STRAWBERRY_FRUITED = 38;
const int FARM_TOMATO_FRUITED = 39;

const int DWARF1_UP = 40;
const int DWARF1_RIGHT = 41;
const int DWARF1_LEFT = 42;
const int DWARF1_DOWN = 43;

const int DWARF2_UP = 44;
const int DWARF2_RIGHT = 45;
const int DWARF2_LEFT = 46;
const int DWARF2_DOWN = 47;

const int DWARF3_UP = 48;
const int DWARF3_RIGHT = 49;
const int DWARF3_LEFT = 50;
const int DWARF3_DOWN = 51;

const int FARM_PLOWED_WATERED = 52;







// constant for information
// constant for information
const int INFORMATION_FARM_HELP = 0;
const int INFORMATION_APP_HELP = 1;
const int INFORMATION_HOME_HELP = 2;
const int INFORMATION_STORE_HELP = 3;

const int STATUS_NULL = 1;
const int STATUS_EMPTY = 2;
const int STATUS_FOUND = 3;


#endif
